import requests

response = requests.get("https://www.imooc.com") # 访问网址
print(response.status_code)
print(response.headers)
# print(str(response.content, encoding='utf-8'))
content  = str(response.content, encoding='utf-8')
content_list = content.split("\n")
for line in content_list:
    if 'href' in line or 'www' in line:
        print(line.strip())

response2 = requests.get("http://192.168.1.87:8080/miniodemo/index/listBuckets") # 访问网址
print(response2.status_code)
print(response2.headers)
content2  = str(response2.content, encoding='utf-8')
print(content2)